java get current time in seconds

83

java get current time in seconds -

LocalDateTime date = LocalDateTime.now();
int seconds = date.toLocalTime().toSecondOfDay();

Comments

Submit
0 Comments